# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+aur@gmail.com>

pkgname=perl-template-gd
pkgver=2.66
pkgrel=7
pkgdesc="GD plugin(s) for the Template Toolkit"
arch=('any')
url="https://search.cpan.org/dist/Template-GD"
license=('GPL' 'PerlArtistic')
depends=('perl-template-toolkit>=2.14' 'perl-gd>=1.14')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/A/AB/ABW/Template-GD-$pkgver.tar.gz)
sha256sums=('98523c8192f2e8184042e5a2e172bd767ac289dd2e480f35f680dce32160905b')

build() {
  cd  "$srcdir"/Template-GD-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  "$srcdir"/Template-GD-$pkgver
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
